///引入共享头部
import '../../../common/shard.dart';

import 'package:progressive_image/progressive_image.dart';

List images=[
	{
		"thumbnail":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/6016x4000_6016x4000_HGPid24zDBZiQiX8.jpg?x-oss-process=image/resize,w_10",
		"image":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/6016x4000_6016x4000_HGPid24zDBZiQiX8.jpg"
	},
	{
		"thumbnail":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/5967x3972_5967x3972_csi7rcDPmCNPDftZ.jpg?x-oss-process=image/resize,w_10",
		"image":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/5967x3972_5967x3972_csi7rcDPmCNPDftZ.jpg"
	},
	{
		"thumbnail":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/5568x3712_5568x3712_iRDMACGw4XRpeKGD.jpg?x-oss-process=image/resize,w_10",
		"image":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/5568x3712_5568x3712_iRDMACGw4XRpeKGD.jpg"
	},
	{
		"thumbnail":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/5570x3693_5570x3693_Y2iFwJCpXQTHBM5B.jpg?x-oss-process=image/resize,w_10",
		"image":"https://cfdz-sz-test.oss-cn-shenzhen.aliyuncs.com/artceo/2021/11/16/5570x3693_5570x3693_Y2iFwJCpXQTHBM5B.jpg"
	},
];

class ProgressiveImagePage extends StatelessWidget {
	const ProgressiveImagePage({Key? key}) : super(key: key);



	@override
	Widget build(BuildContext context) {
		return CustomCupertinoScaffold(
			body: GridView.builder(
				gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
					crossAxisCount: 2,
				),
				itemCount: images.length,
				itemBuilder: (BuildContext context, int index) {
					var item=images[index];
					return ProgressiveImage(
						thumbnail: NetworkImage(item['thumbnail']),
						image: NetworkImage(item['image']),
						height: 300,
						width: double.infinity,
						placeholder: const NetworkImage("http://placehold.it/300x300"),
					);
				},
			),
		);
	}
}
